import { createStore } from 'vuex'
import user from "./modules/user";
import getters from "./getters";
export default createStore({
  state: {
    isCollapse: false,
    tags: [{ name: '首页', type: '', key: '/system' }]
  },
  mutations: {
    CHANGECOLLAPSE(state: any) {
      state.isCollapse = !state.isCollapse
    },
    ADDTAGDATA(state: any, tagList: any) {
      console.log(tagList)
      state.tags.push({
        name: tagList[0].meta.title,
        type: '',
        key: tagList[0].meta.key
      })
    }
  },
  actions: {
  },
  modules: {
    user
  },
  getters
})
